package com.six.vo;

import java.sql.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 用户-用户组关系表
 * 
 */
@Entity
@Table(name="WMS_T_U_G")
public class UserGroup {
	private int ugID;// VARCHAR(16) 编号
	private Date ugDate;// DATE 关系建立时间
	private User user;
	private Group group;
	
	public UserGroup() {
		super();
	}
	public UserGroup(int ugID, Date ugDate, User user, Group group) {
		super();
		this.ugID = ugID;
		this.ugDate = ugDate;
		this.user = user;
		this.group = group;
	}
	@Id
	@GeneratedValue
	public int getUgID() {
		return ugID;
	}
	public void setUgID(int ugID) {
		this.ugID = ugID;
	}
	public Date getUgDate() {
		return ugDate;
	}
	public void setUgDate(Date ugDate) {
		this.ugDate = ugDate;
	}
	@ManyToOne
	@JoinColumn(name="ugUserId")// VARCHAR(16) 用户编号
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@ManyToOne
	@JoinColumn(name="ugGroupId")// VARCHAR(16) 用户组编号
	public Group getGroup() {
		return group;
	}
	public void setGroup(Group group) {
		this.group = group;
	}
	

}
